import VueRouter from 'vue-router'

// 导入 Account 组件

//导入对应的路由组件
import HomeContainer  from  "./components/tabbar/HomeContainer.vue"
import MemberContainer  from  './components/tabbar/MemberContainer.vue'
import SearchContainer  from  './components/tabbar/SearchContainer.vue'
import ShopcarContainer  from  './components/tabbar/ShopcarContainer.vue'
import NewListvue from "./components/news/NewListvue.vue"
import NewsInfo from './components/news/NewsInfo.vue'
import PhotoList from "./components/photos/PhotoList.vue";
import GoodsList from "./components/goods/GoodsList.vue";
import Goodsinfo from "./components/goods/Goodsinfo.vue";
import GoodComment from "./components/goods/GoodComment.vue";
import GoodsDesc from "./components/goods/GoodsDesc.vue";
// 3. 创建路由对象
var router = new VueRouter({
  routes: [// 配置路由规则   所有用到路由的都定义在此处
      {path:'/',component:HomeContainer},
      {path:'/home',component:HomeContainer},
      {path:'/member',component:MemberContainer},
      {path:'/shopcar',component:ShopcarContainer},
      {path:'/search',component:SearchContainer},
      {path:'/home/newlist',component:NewListvue},
      {path:'/home/newsinfo/1',component:NewsInfo},
      {path:'/home/photolist',component:PhotoList},
      {path:'/home/goodslist',component:GoodsList},
      {path:'/home/goodsinfo/1',component:Goodsinfo,name:'goodsinfo'},
      {path:'/home/goodsdesc/1',component:GoodsDesc,name:'goodsdesc'},
      {path:'/home/goodscomment/1',component:GoodComment,name:'goodscomment'}
  ],
    // 写上这一步实现路由切换高亮
    linkActiveClass:'mui-active' //覆盖路由默认的高亮的类，默认的类叫router-link-active
})

// 把路由对象暴露出去
export default router